#ifndef DD_CONTEXT_H
#define DD_CONTEXT_H

/* global camera
 * this is a "point" in 3d space, that is used as an "offset" to draw meshes
 * it can be manipulated with functions to simulate a camera
 */
struct dd_dynamic_array *dd_cam;

#define dd_global_matrix dd_da_get(dd_cam, dd_cam->elements-1)

int dd_create_context();

void dd_buffer_clear();
void dd_buffer_draw();

void dd_version();

void (*dd_update)(void);
void (*dd_draw)(void);

void dd_loop();

void dd_update_func(void*);
void dd_draw_func(void*);
#define dd_update_func(x) dd_update = x
#define dd_draw_func(x) dd_draw = x

#endif
